/*
 * @file: log/include/Logger.h
 * @author: Wolfhead
 */

#ifndef _LOG_LOGGER_H_
#define _LOG_LOGGER_H_

#include <boost/shared_ptr.hpp>
#include "../detail/SyncQueue.h"
#include "../LogData.h"

namespace logger
{

class Logger;
typedef boost::shared_ptr<Logger> LoggerPtr;

class Logger
{
public:

	typedef SyncQueue<LogDataPtr> Queue;
	typedef Queue::QueueType SpliteQueue;

	virtual ~Logger()
	{
	}

	// log message to device
	// should be thread safe
	virtual int log(const std::string& message) = 0;

	virtual int log(const SpliteQueue& message_queue) = 0;

    virtual int flush(){return 0;}
};

} //namespace logger

#endif //#ifndef _LOG_LOGGER_H_
